<?php

use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class Article extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        //
        Schema::create('article',function(Blueprint $table)
        {
            $table->increments('id')->comment('主键');
            $table->string('name')->comment('名称')->uqinue()->index();
            $table->char('cateid',4)->comment('栏目id');
            $table->string('background')->default('无')->comment('发布北京及心情');
            $table->longText('content')->comment('内容');
            $table->string('thumb')->comment('配图');
            $table->char('private',1)->comment('是否私有');
            $table->integer('tming')->default('0')->comment('定时发布时间');
            $table->char('status',1)->default('1')->comment('状态');
            $table->timestamps();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        //
        Schema::dropIfExists('article');
    }
}
